﻿@model  IEnumerable<HexagonWeb.Models.Ticket>
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    ViewBag.Title = "订票详情";
}


<div class="row">
    <div class="col-md-3 col-sm-4">@Html.Partial("Info")</div>
    <div class="col-md-9 col-sm-8">
        <h4>订票详情</h4>
        <hr />
        <table class="table">
            <tr>
                <th>
                    @Html.DisplayNameFor(model => model.Level)
                </th>
                <th>
                    @Html.DisplayNameFor(model => model.Row)
                </th>
                <th>
                    @Html.DisplayNameFor(model => model.Column)
                </th>
            </tr>
            @foreach (var item in Model)
            {
                
                <tr>
                    @using (Html.BeginForm("TicketCancel", "User"))
                    {
                        <input type="hidden" name="PNR" id="PNR"
                               value="@item.PNR"/>
                    <td>
                        @if (item.Level == 0)
                        {
                            <span>经济等级</span>
                        }
                        @if (item.Level == 1)
                        {
                            <span>商业等级</span>
                        }
                        @if (item.Level == 2)
                        {
                            <span>最高等级</span>
                        }
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.Row)
                    </td>

                     <td>
                       @Html.DisplayFor(modelItem => item.Column)
                     </td>
                    @*<td>
                        @switch (item.Column)
                        {
                            case 1:
                                <span>A</span>
                                break;
                            case 2:
                            <span>B</span>
                                break;
                            case 3:
                                if (item.Type == 0)
                                {
                                    if (item.Level == 0)
                                    {
                                        <span>C</span>
                                    }
                                    else
                                    {
                                        <span>E</span>
                                    }
                                }
                                else
                                {
                                    if (item.Level == 2)
                                    {
                                        <span>E</span>
                                    }
                                    else if (item.Level == 1)
                                    {
                                        <span>D</span>
                                    }
                                    else
                                    {
                                        <span>C</span>
                                    }
                                }
                                break;
                            case 4:
                                if (item.Type == 0)
                                {
                                    if (item.Level == 0)
                                    {
                                        <span>D</span>
                                    }
                                    else
                                    {
                                        <span>F</span>
                                    }
                                }
                                else
                                {
                                    if (item.Level == 2)
                                    {
                                        <span>F</span>
                                    }
                                    else if (item.Level == 1)
                                    {
                                        <span>E</span>
                                    }
                                    else
                                    {
                                        <span>D</span>
                                    }
                                }
                                break;
                            case 5:
                                if (item.Type == 0)
                                {
                                    if (item.Level == 0)
                                    {
                                        <span>E</span>
                                    }
                                    else
                                    {
                                        <span>G</span>
                                    }
                                }
                                else
                                {
                                    if (item.Level == 2)
                                    {
                                        <span>J</span>
                                    }
                                    else if (item.Level == 1)
                                    {
                                        <span>F2</span>
                                    }
                                    else
                                    {
                                        <span>E</span>
                                    }
                                }
                                break;
                            case 6:
                                if (item.Type == 0)
                                {
                                    if (item.Level == 0)
                                    {
                                        <span>F</span>
                                    }
                                    else
                                    {
                                        <span>H</span>
                                    }
                                }
                                else
                                {
                                    if (item.Level == 2)
                                    {
                                        <span>K</span>
                                    }
                                    else if (item.Level == 1)
                                    {
                                        <span>J</span>
                                    }
                                    else
                                    {
                                        <span>F</span>
                                    }
                                }
                                break;
                            case 7:
                                if (item.Type == 0)
                                {
                                    <span>G</span>
                                }
                                else
                                {
                                    if (item.Level == 1)
                                    {
                                        <span>K</span>
                                    }
                                    else
                                    {
                                        <span>G</span>
                                    }
                                }
                                break;
                            case 8:
                                if (item.Type == 0)
                                {
                                    <span>H</span>
                                }
                                else
                                {
                                    <span>H</span>
                                }
                                break;
                            case 9:
                            <span>J</span>
                                break;
                            case 10:
                            <span>K</span>
                                break;

                        }
                    </td>*@
                            @*if (item.Level == 0)
                            {
                                  <td>item.airline.LowCost</td>
                            }
                            if (item.Level == 1)
                            {
                                <td>item.airline.MidCost</td>
                            }
                            if (item.Level == 2)
                            {
                                <td>item.airline.TopCost</td>
                            }*@
                    <td>
                        <input type="submit" value="取消" class="btn btn-default" />
                    </td>
                    }
                </tr>
        }
        </table>
    </div>
</div>